#ifndef DPCLOCK_H
#define DPCLOCK_H


#include <QtGui/QtGui>
#include <QtCore/QtCore>

class DPClock : public QGraphicsObject
{
    Q_OBJECT
public:
    DPClock( QGraphicsItem * parent = 0 );

    void initPixmapsIni(const QString& cfgName);

    QRectF boundingRect() const;
    void paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *);

    void setTime(int nSeconds);
public slots:
    void updateTimer();
    void start();
    void stop();
public:
    QPixmap mNumPixmaps[10];
    QPixmap mClockPixmap;
    QList<int> mNums;
    QTimer* mTimer;
};

#endif // DPCLOCK_H
